{php include pubTemplate("header_admin")}
<div class="midder">
    {php include template("admin/menu");}
    <div>
        <table class="table table-hover">


            <thead class="thead-light">

            <tr><th>积分名称</th><th>key</th><th>分数</th><th>对应app</th><th>对应action</th><th>对应mg</th><th>对应ts</th><th>状态</th><th>设置</th> </tr>

            </thead>


            <tbody>



            {loop $arrScore $key $item}
            <form method="post" action="{SITE_URL}index.php?app=user&ac=admin&mg=score&ts=editdo">
                <tr>
                    <td>{$item['scorename']}</td>
                    <td>{$item['scorekey']}</td>
                    <td><input style="width:70px" name="score" value="{$item['score']}" /></td>
                    <td><input style="width:70px" name="app" value="{$item['app']}" /></td>
                    <td><input style="width:70px" name="action" value="{$item['action']}" /></td>
                    <td><input style="width:70px" name="mg" value="{$item['mg']}" /></td>
                    <td><input style="width:70px" name="ts" value="{$item['ts']}" /></td>
                    <td>
                        <select name="status">
                            <option value="0" {if $item['status']=='0'}selected{/if}>加积分</option>
                            <option value="1" {if $item['status']=='1'}selected{/if}>减积分</option>
                        </select>
                    </td>
                    <td>
                        <input type="hidden" name="scoreid" value="{$item['scoreid']}" /><input type="submit" value="修改" /> | 
                        <a href="{SITE_URL}index.php?app=user&ac=admin&mg=score&ts=delete&scoreid={$item['scoreid']}" onclick="return confirm('确定删除吗？')">删除</a>
                    </td>
                </tr>
            </form>
            {/loop}



            </tbody>



        </table>
    </div>
    <div>
        <h6>添加积分节点</h6>
        <form method="post" action="{SITE_URL}index.php?app=user&ac=admin&mg=score&ts=adddo">
            <table class="table table-hover">
                <tr><td width="200">积分名称：</td><td><input type="text" name="scorename" /></td></tr>
                <tr><td>积分KEY：</td><td><input type="text" name="scorekey" /></td></tr>
                <tr><td>积分：</td><td><input type="text" name="score" /></td></tr>
                <tr><td>对应APP：</td><td><input type="text" name="app" /></td></tr>
                <tr><td>对应ACTION：</td><td><input type="text" name="action" /></td></tr>
                <tr><td>对应MG：</td><td><input type="text" name="mg" /></td></tr>
                <tr><td>对应TS：</td><td><input type="text" name="ts" /></td></tr>
                <tr><td>状态：</td><td><input type="radio" name="status" value="0" checked="select" />加积分 <input type="radio" name="status" value="1" />减积分</td></tr>
                <tr><td></td><td><input type="submit" value="提交" /></td></tr>
            </table>
        </form>
    </div>
    <div>
        <h6>积分使用帮助</h6>
        <p>1、在需要使用积分的php代码处加：</p>
        <code>
            aac('user')->doScore({php echo '$app'},{php echo '$ac'},{php echo '$ts'},{php echo '$uid'},{php echo '$mg'})
        </code>
        <p>以上代码具体使用方式请看app/user/class.user.php中doScore方法</p>
        <p>2、根据对应的app,action,ts,uid,mg变量配置好积分</p>
    </div>
</div>{php include pubTemplate("footer_admin")}